import request from '@/utils/request'

// 查询数据渠道管理列表
export function listChannelDataConf(query) {
  return request({
    url: '/channel/channelDataConf/list',
    method: 'get',
    params: query
  })
}

export function noListChannelDataConf(query) {
  return request({
    url: '/channel/channelDataConf/noList',
    method: 'get',
    params: query
  })
}

// 查询数据渠道管理详细
export function getChannelDataConf(id) {
  return request({
    url: '/channel/channelDataConf/' + id,
    method: 'get'
  })
}

// 新增数据渠道管理
export function addChannelDataConf(data) {
  return request({
    url: '/channel/channelDataConf',
    method: 'post',
    data: data
  })
}

// 更改渠道数据状态
export function updateOpenConf(data) {
  return request({
    url: '/channel/channelDataConf/isOpen',
    method: 'post',
    data: data
  })
}

// 修改数据渠道管理
export function updateChannelDataConf(data) {
  return request({
    url: '/channel/channelDataConf',
    method: 'put',
    data: data
  })
}

// 删除数据渠道管理
export function delChannelDataConf(id) {
  return request({
    url: '/channel/channelDataConf/' + id,
    method: 'delete'
  })
}
